<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{  /*全职 0 很容易被覆盖*/
				color: #ffcf53 !important;
				background: #00ffff !important;
			}
			div{ /*权值 1*/
				color: #34ff3a;
				background: #b18cff;
			}
			.d1{ /*权值 10*/
				color: #ff55ff;
				background: #ff0000;
			}
			div.d1{ /*选择器权值之和*/
				color: #83aa8f;
				background: #00ffff;
			}
			body div.d1{ /*权值 12*/
				font-size: 25px;
				color: #0055ff;
				background: #aa007f;
			}
			#d1{ /*权值 100*/
				font-size: 15px;
				color: #ffff7f;
				background: #aa5500;
			}
			div#d1{ /*权值 101*/
				font-size: 20px;
				color: #e552ff;
				background: #00007f;
			}
			div#d1:hover{ /*权值 111*/
				color: #ff799d;
				background: #aa0957;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color: red;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum ab voluptas ad, quisquam blanditiis labore earum inventore minus aliquid laboriosam porro eos pariatur magni, mollitia officia dolorum nihil itaque hic.</div>
	</body>
</html>